export const radioGroup = {
    template: `<el-radio-group v-model="filterYear" @change="change">
                    <el-radio label="1">过去1年</el-radio>
                    <el-radio label="3">过去3年</el-radio>
                    <el-radio label="0">全部数据</el-radio>
                </el-radio-group>`,
    data() {
        return {
            filterYear: '3', //按年份筛选
        }
    },
    methods: {
        //传递给调用该mixin组件的父组件的方法，按年份筛选
        change() {
            this.$emit('radioChange', this.filterYear);
        },
    }
};
